package com.jswzc.common.api.controller;

import com.jswzc.api.service.demo.DubboServiceI;
import com.jswzc.common.api.zook.Global;
import com.jswzc.framework.controller.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletResponse;

/**
 * Created by liujiajia on 2017/5/11.
 */
@Controller
@RequestMapping("/demo")
public class DemoController extends BaseController{

    @Autowired
    private DubboServiceI dubboService;

    @RequestMapping("/demoTest")
    public void demoTest(HttpServletResponse response){
        System.out.println(Global.getLocalProv());
        try {
            String ss= dubboService.testConnect();
            writeJson(ss,response);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
